<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2018/9/13
  Time: 19:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>欢迎来到学生管理界面</title>
    <link rel="stylesheet" type="text/css" href="/static/css/admin_main.css">
    <link rel="stylesheet" type="text/css" href="/static/css/stuAdmin.css">
    <script type="text/javascript" rel="script" src="/static/js/jq.js"></script>
    <script type="text/javascript" rel="script" src="/static/js/stuAdmin_main.js"></script>
</head>
<body>
<div class="navigator">
    <div class="title">
        <p>Manage</p>
    </div>
    <div class="admin_manage">
        <p>学生管理员</p>
    </div>
</div>
<div class="main_con">
    <div class="header">
        <p>ChenforCode图书馆管理系统</p>
        <a href="/login/doLogout">退出登陆</a>
    </div>
    <div class="content">
        <div class="info">
            <h3>学生</h3>
            <a class="create1">创建</a>
            <span>${sessionScope.delstu_msg}${sessionScope.addstu_msg}</span>
            <table class="gridtable">
                <tr>
                    <td>学号</td>
                    <td>密码</td>
                    <td>姓名</td>
                    <td>性别</td>
                    <td>学院</td>
                    <td>班级</td>
                    <td>余额</td>
                    <td>可借书籍总量</td>
                    <td>已借书籍数量</td>
                    <td>操作类型</td>
                </tr>
                <c:forEach items="${students}" var="s">
                    <tr>
                        <td>${s.sno}</td>
                        <td>${s.spwd}</td>
                        <td>${s.sname}</td>
                        <td>${s.gender}</td>
                        <td>${s.college}</td>
                        <td>${s.sclass}</td>
                        <td>${s.balance}</td>
                        <td>${s.total}</td>
                        <td>${s.have}</td>
                        <td>
                            <a href="/admin/upStudentPro?id=${s.sno}">修改</a>
                            <a href="/admin/delStudent?id=${s.sno}" onclick='return confirm("是否确认删除？")'>删除</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>

            <div class="add_ad1" style="display: none">
                <form action="/admin/addStudent" class="add_ad1_form">
                    <div>
                        学号:<input type="text" class="c" name="sno">
                    </div>
                    <div>
                        密码:<input type="text" class="c" name="spwd">
                    </div>
                    <div>
                        姓名:<input type="text" class="c" name="sname">
                    </div>
                    <div>
                        性别:<input type="text" class="c" name="gender">
                    </div>
                    <div>
                        学院:<input type="text" class="c" name="college">
                    </div>
                    <div>
                        班级:<input type="text" class="c" name="sclass">
                    </div>
                    <div>
                        余额:<input type="text" class="c c1" name="balance">
                    </div>
                    <div>
                        可借书籍总量:<input type="text" class="c c2" name="total">
                    </div>
                    <div>
                        已借书籍总量:<input type="text" class="c" name="have" value="0" readonly="readonly">
                    </div>

                    <input type="button" class="ad_bt1" value="增加学生">
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
